Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXcxi_ptycho contributed definition #628

Merged
merged 11 commits into from
Oct 27, 2018
Merged

NXcxi_ptycho contributed definition #628

merged 11 commits into from
Oct 27, 2018

Conversation

aaron-parsons
Copy link
Contributor

Hi,

This contains a applications definition for NXptycho for ptychography experiments. It's come about after talking to the CXI (another file format for coherent imaging experiments) community and merges the two so that NXptycho is CXI compatible. We are starting to use this at Diamond now on multiple beamlines.

I'll also be adding a PR to nexusformat/exampledata with some example files for you to look through.

Let me know if something wasn't clear in the xml and I can change it, I wasn't sure at which level I needed to specify things, but hopefully the doc makes it clear.

I needed to add an extra field to NXbeam so thats included here too. It's just information about the extent of the beam, which is useful for ptychography.

Aaron
@markbasham

@prjemian prjemian self-requested a review October 25, 2018 13:13
@prjemian
Copy link
Contributor

Two errors:

NXDL_Invalid: contributed_definitions/NXbeam.nxdl.xml : Element '{http://definition.nexusformat.org/nxdl/3.1}definition', attribute 'version': The attribute 'version' is not allowed., line 29

NXDL_Invalid: contributed_definitions/NXptycho.nxdl.xml : Element '{http://definition.nexusformat.org/nxdl/3.1}definition', attribute 'version': The attribute 'version' is not allowed., line 32

Remove the @version attribute from both files.

@prjemian
Copy link
Contributor

You can repeat this test yourself by running python ./utils/test_suite.py in the definitions root directory.

@aaron-parsons
Copy link
Contributor Author

You can repeat this test yourself by running python ./utils/test_suite.py in the definitions root directory.

This doesn't test the contributed definitions. Do I have to change something?

@prjemian
Copy link
Contributor

Hmmm... It should. When run in travis-ci (see above report), contributed definitions were run, otherwise there would not have been a report.

@markbasham
Copy link
Contributor

Thanks @aaron-parsons

@aaron-parsons
Copy link
Contributor Author

@prjemian It does now. I was being silly and hadn't updated my fork in a while so it didn't include changes to this test. It does now, and everything passes so the merge should be straight forward.

@prjemian
Copy link
Contributor

Confirmation that contributed definitions are tested from command line:

mintadmin@mint-vm ~/.../NeXus/definitions $ git pull
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 10 (delta 4), reused 6 (delta 3), pack-reused 1
Unpacking objects: 100% (10/10), done.
From https://github.com/nexusformat/definitions
   2dc081e..4fc648d  master     -> origin/master
Updating 2dc081e..4fc648d
Fast-forward
 base_classes/NXlog.nxdl.xml                       |  2 +-
 contributed_definitions/NXcsg.nxdl.xml            | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 contributed_definitions/NXquadric.nxdl.xml        | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 contributed_definitions/NXsolid_geometry.nxdl.xml | 56 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 232 insertions(+), 1 deletion(-)
 create mode 100644 contributed_definitions/NXcsg.nxdl.xml
 create mode 100644 contributed_definitions/NXquadric.nxdl.xml
 create mode 100644 contributed_definitions/NXsolid_geometry.nxdl.xml
mintadmin@mint-vm ~/.../NeXus/definitions $ python ./utils/test_suite.py
test__1__base_classes__NXaperture (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXattenuator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXbeam (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXbeam_stop (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXbending_magnet (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcapillary (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcite (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcollection (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcollimator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcrystal (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcylindrical_geometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdata (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdetector (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdetector_group (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdetector_module (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdisk_chopper (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXentry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXenvironment (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXevent_data (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXfermi_chopper (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXfilter (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXflipper (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXfresnel_zone_plate (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXgeometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXgrating (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXguide (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXinsertion_device (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXinstrument (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXlog (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmirror (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmoderator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmonitor (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmonochromator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXnote (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXobject (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXoff_geometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXorientation (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXparameters (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXpinhole (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXpolarizer (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXpositioner (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXprocess (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXreflections (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXroot (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsample (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsample_component (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsensor (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXshape (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXslit (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsource (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsubentry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXtransformations (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXtranslation (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXuser (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXvelocity_selector (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXxraylens (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXarchive (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXarpes (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXcanSAS (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXdirecttof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXfluo (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXindirecttof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXiqproc (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXlauetof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXmonopd (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXmx (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXrefscan (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXreftof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXsas (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXsastof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXscan (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXspe (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXsqom (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXstxm (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtas (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtofnpd (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtofraw (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtofsingle (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtomo (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtomophase (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtomoproc (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxas (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxasproc (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxbase (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxeuler (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxkappa (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxlaue (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxlaueplate (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxnb (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxrot (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXcontainer (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXcsg (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXelectrostatic_kicker (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXmagnetic_kicker (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXquadric (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXquadrupole_magnet (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXseparator (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsnsevent (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsnshisto (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsolenoid_magnet (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsolid_geometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXspecdata (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXspin_rotator (test_nxdl.Individual_NXDL_Tests) ... ok
test_application_definition_NXcanSAS (test_nxdl2rst.Issue_524_Clarify_Optional_or_Required) ... ok
test_base_class_NXentry (test_nxdl2rst.Issue_524_Clarify_Optional_or_Required) ... ok
test_base_class_NXuser (test_nxdl2rst.Issue_524_Clarify_Optional_or_Required) ... ok

----------------------------------------------------------------------
Ran 106 tests in 0.140s

OK
mintadmin@mint-vm ~/.../NeXus/definitions $ 

testing of this specific PR

same, but includes the new classes

mintadmin@mint-vm /tmp $ git clone https://github.com/aaron-parsons/definitions
Cloning into 'definitions'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 19085 (delta 11), reused 18 (delta 7), pack-reused 19062
Receiving objects: 100% (19085/19085), 45.85 MiB | 24.84 MiB/s, done.
Resolving deltas: 100% (13756/13756), done.
Checking connectivity... done.
mintadmin@mint-vm /tmp $ cd definitions/
mintadmin@mint-vm /tmp/definitions $ !pyth
python ./utils/test_suite.py
test__1__base_classes__NXaperture (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXattenuator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXbeam (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXbeam_stop (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXbending_magnet (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcapillary (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcite (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcollection (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcollimator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcrystal (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXcylindrical_geometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdata (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdetector (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdetector_group (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdetector_module (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXdisk_chopper (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXentry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXenvironment (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXevent_data (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXfermi_chopper (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXfilter (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXflipper (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXfresnel_zone_plate (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXgeometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXgrating (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXguide (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXinsertion_device (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXinstrument (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXlog (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmirror (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmoderator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmonitor (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXmonochromator (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXnote (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXobject (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXoff_geometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXorientation (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXparameters (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXpinhole (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXpolarizer (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXpositioner (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXprocess (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXreflections (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXroot (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsample (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsample_component (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsensor (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXshape (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXslit (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsource (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXsubentry (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXtransformations (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXtranslation (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXuser (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXvelocity_selector (test_nxdl.Individual_NXDL_Tests) ... ok
test__1__base_classes__NXxraylens (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXarchive (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXarpes (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXcanSAS (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXdirecttof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXfluo (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXindirecttof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXiqproc (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXlauetof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXmonopd (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXmx (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXrefscan (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXreftof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXsas (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXsastof (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXscan (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXspe (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXsqom (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXstxm (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtas (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtofnpd (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtofraw (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtofsingle (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtomo (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtomophase (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXtomoproc (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxas (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxasproc (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxbase (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxeuler (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxkappa (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxlaue (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxlaueplate (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxnb (test_nxdl.Individual_NXDL_Tests) ... ok
test__2__applications__NXxrot (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXbeam (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXcontainer (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXcsg (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXelectrostatic_kicker (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXmagnetic_kicker (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXptycho (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXquadric (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXquadrupole_magnet (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXseparator (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsnsevent (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsnshisto (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsolenoid_magnet (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXsolid_geometry (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXspecdata (test_nxdl.Individual_NXDL_Tests) ... ok
test__3__contributed_definitions__NXspin_rotator (test_nxdl.Individual_NXDL_Tests) ... ok
test_application_definition_NXcanSAS (test_nxdl2rst.Issue_524_Clarify_Optional_or_Required) ... ok
test_base_class_NXentry (test_nxdl2rst.Issue_524_Clarify_Optional_or_Required) ... ok
test_base_class_NXuser (test_nxdl2rst.Issue_524_Clarify_Optional_or_Required) ... ok

----------------------------------------------------------------------
Ran 108 tests in 0.124s

OK
mintadmin@mint-vm /tmp/definitions $ 

@prjemian
Copy link
Contributor

Changes to NXbeam should be made in base_classes/NXbeam.nxdl.xml in your repo and then remove contributed_definitions/NXbeam.nxdl.xml

@aaron-parsons
Copy link
Contributor Author

Ok I've corrected that now.

@prjemian
Copy link
Contributor

Interesting that this was not caught by the previous testing. The Sphinx documentation caught this error. There is no NeXus base class called NXgroup. You must specify which of the base classes to use as the argument to the @type attribute of a <group> element:

/home/travis/build/nexusformat/definitions/build/manual/source/classes/contributed_definitions/NXptycho.rst:302: WARNING: undefined label: nxgroup (if the link has no caption the label must precede a section header)
/home/travis/build/nexusformat/definitions/build/manual/source/classes/contributed_definitions/NXptycho.rst:337: WARNING: undefined label: nxgroup (if the link has no caption the label must precede a section header)

This means to change only two places in the NXDL file:

  • line 202: suggest you use NXdata

I'm not certain how best to resolve lines 224-226 of the NXDL. Perhaps replace:

			<group type="NXgroup" name="geometry_1" minOccurs="1" maxOccurs="1">
				<link name="translation" target="/NXentry/NXinstrument/NXdetector/translation"/>
			</group>

with

			<link name="translation" target="/NXentry/NXinstrument/NXdetector/translation"/>

@aaron-parsons
Copy link
Contributor Author

Thanks for reviewing this. These both come about because we are trying to make this compatable with the CXI format. Technically these two entries don't need to be NeXus fields at all and are only there to ensure the compatibility on the CXI side. I'd rather not make line 202 an NXdata, because it isn't nexus formatted, and can't be. This would break things.

I can see two options to get around this, or I'm happy to take another course if you can see one:

  1. Make these both NXnotes. They are additional information not covered by the nexus format.

  2. The data_1 would go away if we say that for NXptycho everything needs to be treated as an arbitrary scan (i.e. rasters are also treated like arbitrary). I know that STXM people wouldn't be happy with this. We would also still have that additional geometry_1...

What do you think?

Aaron

@aaron-parsons
Copy link
Contributor Author

I've converted them to NXnote now so let me know if that isn't a good solution. @markbasham do you have any thoughts on this?

@prjemian
Copy link
Contributor

Ah, good. In the first case (line 202), the best base class to use is NXcollection which is used to contain non-NeXus content. You've described this exactly.

@aaron-parsons
Copy link
Contributor Author

Ok. I've switched both out for NXcollection after looking at the description for this base class. One thing that concerns me slightly is where it says: "For NeXus validation, NXcollection will always generate a warning since it is always an optional group.".

It's not really an optional group, because we need it for the CXI validation. So if we really want this to be compatible both it should be a required group, but one that isn't validated by NeXus since it's not NeXus content.

Does it sound ok?

@aaron-parsons
Copy link
Contributor Author

@markbasham Have renamed this as requested.

@markbasham
Copy link
Contributor

@aaron-parsons sorry other way round NXcxi_ptycho then i think we are all good to go.

@prjemian prjemian added this to the NXDL 2019.1 milestone Oct 26, 2018
@aaron-parsons
Copy link
Contributor Author

@markbasham Right you are. All done.

@zjttoefs zjttoefs merged commit d550abd into nexusformat:master Oct 27, 2018
@prjemian
Copy link
Contributor

prjemian commented Sep 11, 2019

change the name of this PR to new name of NXDL class

@prjemian prjemian changed the title NXptycho contributed definition NXcxi_ptycho contributed definition Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants